Flash memory (also “flash”), phase-change memory, and other solid-state memory devices are becoming more popular for use in storage systems due to increased reliability and reduced energy usage due to the elimination of mechanical moving parts when compared to disk-based devices. In addition, flash memory can perform random read and write operations at a much higher rate than magnetic disks. The lower latencies due to increased I/O (input/output) performance also motivate more streamlined synchronization mechanisms. These and other characteristics of flash memory are quite different than disk-based devices and affect strategies for storing data to flash memory. Although more expensive than disks on a per-byte basis, flash memory is cheaper on a per-I/O basis.
The physical characteristics of flash memory are quite different than characteristics of magnetic disks. Like a hard disk, flash storage is a page-oriented device, the main operations of which are read-page, erase multi-page (e.g., 64-page) blocks, and program (write) page. A flash page can be programmed only once after the multi-page block that contains the page has been erased. Erase operations cause flash memory to wear out. Thus, over a large number of erasures (e.g., on the order of tens of thousands to millions) the flash memory can wear out, which is a significant barrier to overcome.
Due to the above characteristics, flash controllers typically treat flash as an append-only medium, and simulate update-in-place behavior as a log-structured file system. Moreover, a single flash chip can handle about thousands of random-reads/second and random-writes/second, whereas, a more expensive disk can handle only hundreds of random reads or writes per second. Unlike DRAM memory or disks, raw flash chips consume almost no power when online and in idle mode. Additionally, sequential and random access is much slower than the similar features of disks.
File systems and database systems are optimized for the characteristics of disks, which are quite different than the characteristics of flash. For example, B-trees are designed to enable contiguous key ranges to be stored in contiguous pages on disk, to obtain the benefits of sequential access. Additionally, fanout is maximized to minimize page accesses, given that page accesses are expensive. On the other hand, database systems assume a page can be written in-place an unbounded number of times. Flash memory offers many benefits provided some of the associated limitations can be overcome.